from pyspec.spec import Spectrum
spec = Spectrum(npts=2048,wstart=3000,deltv=150 )
spec.er = spec.er*0.0 + 1.0
spec.co = spec.co + 11.0
spec.fl = spec.co + numpy.random.randn(spec.npts)
import pyspec.spec
s = pyspec.spec.rebin(spec, wstart=3000., wend=8000, wdelt=1500, mode='vel')
